package com.aike.controller;

import com.aike.service.PlaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@ResponseBody
@Controller
@RequestMapping(value = "/Seat", produces={"text/html;charset=UTF-8;","application/json;"})
public class PlaceController {

    @Autowired
    @Qualifier("placeServiceImpl")
    private PlaceService placeService;

    @RequestMapping("/addHouse")
    public String addHouse(String houseName, Integer type, Integer floorNum)
    {
        return placeService.addHouse(houseName, type, floorNum);
    }

    @RequestMapping("/addRoom")
    public String addRoom(Integer houseId, String roomName, Integer floorPos, Integer colNum, Integer rowNum)
    {
        return placeService.addRoom(houseId, roomName, floorPos, colNum, rowNum);
    }

    @RequestMapping("/searchSeat")
    public String searchSeat(Integer type)
    {
        return placeService.selectSearchSeat(type);
    }



}
